package com.wufun.overseas.main.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.wufun.overseas.R;
import com.wufun.overseas.main.activity.MainActivity;
import com.wufun.overseas.main.base.MyFragment;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by tangbl on 2017/11/30 0030.
 */

public class DetailFragment extends MyFragment {

    @Bind(R.id.bar_title_tx)
    TextView barTitleTx;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container
            , @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_detail, null);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        super.setUserVisibleHint(isVisibleToUser);
    }

    @Override
    public void initWidget(View... v) {
        super.initWidget(v);
        barTitleTx.setText(R.string.detail_title_str);
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.bar_back_iv, R.id.bar_back_ll})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.bar_back_iv:
            case R.id.bar_back_ll:
                ((MainActivity) getActivity()).selectItemView(0);
                break;
        }
    }
}
